import React from 'react'
import style from "./css/index.module.css"
export default function List({userList, isSearch, isSearching}) {
  return (
    <ul className={style.outer}>
      {
        isSearch ? isSearching ? <h2>正在搜索中</h2> : userList.map(item=>{
          return (
            <li key={item.id}>
              <img src={item.avatar_url} alt="" />
              <p>{item.login}</p>
            </li>
          )
        }) : <h2>请点击搜索按钮开始搜索</h2>
      }
    </ul>
  )
}
